package com.yy.jhl.ui.user.activity;

import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.yy.common.base.BaseActivity;
import com.yy.common.commonutils.StringUtil;
import com.yy.common.commonwidget.OnDoubleClickListener;
import com.yy.common.commonwidget.OnNoDoubleClickListener;
import com.yy.jhl.R;
import com.yy.jhl.util.DataUtil;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Created by libingn on 2017/12/4.
 */

public class BindPhoneActivity extends BaseActivity {


    @BindView(R.id.phone_num)
    TextView phoneNum;
    @BindView(R.id.bind_phone_parent)
    LinearLayout bindPhoneParent;

    @Override
    public int getLayoutId() {
        return R.layout.act_bind_phone;
    }

    @Override
    public void initView() {
        showTitle("手机绑定", new OnNoDoubleClickListener() {
            @Override
            protected void onNoDoubleClick(View v) {
                finish();
            }
        });
    }

    @Override
    protected void onStart() {
        super.onStart();
        String currentPhone = DataUtil.getUserInfo(mContext).getMobile_phone();
        phoneNum.setText(StringUtil.isEmpty(currentPhone) ? "" : StringUtil.getPhoneMiddle(currentPhone));
    }

    @OnClick(R.id.bind_phone_parent)
    public void onViewClicked() {
        startActivity(FillCodeActivity.class);
    }
}
